const behavior = {}
const TokenKey = 'QUANT-APP-BEHAVIOR-TOKEN'
behavior.push = function(behaviorName,behaviorData){
	let behaviorList = uni.getStorageSync(TokenKey)
	if(typeof(behaviorList) == "string"){
		behaviorList = new Array();
	}
	behaviorData["behaviorCode"] = "";
	behaviorData["param"] = behaviorData;
	behaviorData["behaviorName"] = behaviorName;
	behaviorData["joinTime"] = "";
	behaviorList.push(behaviorData)
	try {
		//console.log(behaviorList)
		//uni.setStorageSync(TokenKey,behaviorList);
	} catch (error) {
		//TODO handle the exception
		console.log("失败",error)
	}
}

behavior.pull = function(){
	return uni.getStorageSync(TokenKey)
}

export default behavior
